﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;

public static class SessionHelper
{
    public const string UserKey = "User";
    public static User UserInfo
    {
        get
        {
            if (Session[UserKey] != null)
            {
                return Session[UserKey] as User;
            }
            return null;
        }
        set
        {
            Session[UserKey] = value;
        }
    }

    private static HttpSessionState Session
    {
        get
        {
            return HttpContext.Current.Session;
        }
    }
}
